package com.wrt.wm.listener;

import com.wrt.wm.util.CleanProjectFileUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.stereotype.Component;

/**
 * 应用停止监听器
 * 
 * @author 文瑞涛
 */
@Component
public class ApplicationClosedEventListener implements ApplicationListener<ContextClosedEvent>{

    @Autowired
	private CleanProjectFileUtil cleanAll;

    @Override
    public void onApplicationEvent(ContextClosedEvent event) {
    	cleanAll.cleanAll();
    }
    
}
